C++/C#/Java: Split localFlowStep predicate in two#1780
Merged
Conversation
There's now a `localFlowStep` predicate for use directly in queries and other libraries and a `simpleLocalFlowStep` for use only by the global data flow library. The former predicate is intended to include field flow, but the latter may not. This will let Java and C# (and possibly C++ IR) avoid getting two kinds of field flow at the same time, both from SSA and from the global data flow library. It should let C++ AST add some form of field flow to `localFlowStep` without making it an input to the global data flow library.
hvitved
requested changes
Aug 21, 2019
| * data flow. It may have less flow than the `localFlowStep` predicate. | ||
| */ | ||
| cached | ||
| predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) { |
Contributor
There was a problem hiding this comment.
If you move this to the Private module you can avoid exposing it.
Contributor
Author
There was a problem hiding this comment.
That's correct, but it's not trivial to move it. Its dependencies would also have to move, and it might interfere with caching and require a cached module. I agree that the C# code organisation is better, but I'd rather reorganize the C++ code in a C++-only PR.
`localFlowStep` is no longer an alias because it should not have the same QLDoc as `simpleLocalFlowStep`.
hvitved
previously approved these changes
Aug 21, 2019
aschackmull
previously approved these changes
Aug 21, 2019
There was also a use of `localFlowStep` in `DataFlowImplCommon` that should now be `simpleLocalFlowStep`.
hvitved
approved these changes
Aug 21, 2019
aschackmull
approved these changes
Aug 21, 2019
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's now a
localFlowSteppredicate for use directly in queries and other libraries and asimpleLocalFlowStepfor use only by the global data flow library. The former predicate is intended to include field flow, but the latter may not.This will let Java and C# (and possibly C++ IR) avoid getting two kinds of field flow at the same time, both from SSA and from the global data flow library. It should let C++ AST add some form of field flow to
localFlowStepwithout making it an input to the global data flow library.